<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>预约后台管理-管理员登录</title>
    <link rel="stylesheet" href="__PUBLIC__/console/css/pintuer.css">
    <link rel="stylesheet" href="__PUBLIC__/console/css/admin.css">
    <script src="__PUBLIC__/console/js/jquery.js"></script>
    <script src="__PUBLIC__/console/js/pintuer.js"></script>
    <script src="__PUBLIC__/console/js/respond.js"></script>
    <script src="__PUBLIC__/console/js/admin.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/layer/layer.min.js"></script>
    <link type="image/x-icon" href="/favicon.ico" rel="shortcut icon" />
    <link href="/favicon.ico" rel="bookmark icon" />
</head>

<body>
<div class="container">
    <div class="line">
        <div class="xs6 xm4 xs3-move xm4-move">
            <br /><br />
            <div class="media media-y">
                <a href="#" target="_blank"><img src="__PUBLIC__/console/images/logo.png" class="radius" alt="后台管理系统" /></a>
            </div>
            <br /><br />
            <form action="index.html" method="post">
            <div class="panel">
                <div class="panel-head"><strong>登录预约后台管理系统</strong></div>
                <div class="panel-body" style="padding:30px;">
                    <div class="form-group">
                        <div class="field field-icon-right">
                            <input type="text" class="input" name="username" placeholder="登录账号" data-validate="required:请填写账号,length#>=5:账号长度不符合要求" />
                            <span class="icon icon-user"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="field field-icon-right">
                            <input type="password" class="input" name="password" placeholder="登录密码" data-validate="required:请填写密码,length#>=6:密码长度不符合要求" />
                            <span class="icon icon-key"></span>
                        </div>
                    </div>
                   </div>
                <div class="panel-foot text-center"><button class="button button-block bg-main text-big" id="sure">立即登录后台</button></div>
            </div>
            </form>
        </div>
    </div>
</div>

</body>
<script>
    
    $('#sure').click(function(){

       $.post('/console/login/doLogin',$('form').serialize(),function(data){


            if ( data.status )
            {
                layer.alert(data.info, 1);

                 window.location.href = '/console/index';
            }
            else
            {
                layer.alert(data.info);
            }

        },'json');

          return false;


    })

</script>
</html>